Importing Custom Libraries
Using custom Java libraries like third-party or in-house libraries when writing automation code requires additional setup. The installation is done through JAR files.
Where You Can Use Custom Libraries
After adding custom libraries, you can import them when writing code for the following:
- Anything that executes on RSRemote, including:
- ActionTask types that feature Groovy content like
REMOTE
andOS
- Gateways filter scripts
- ActionTask types that feature Groovy content like
- ActionTask components that run on RSControl: Preprocessor, Assess
- Tomcat web applications running on RSView
Installing Custom Libraries
You can add custom libraries in two locations on your Actions Pro nodes:
<install-path>/customlibs
<install-path>/gatewaylibs
Both paths appear on the classpath for RSRemote, RSControl, and RSView and all those components can access JARs from both locations. The components, however, load these directories in a different order:
- RSRemote and RSControl load JARs from
gatewaylibs
first, and then fromcustomlibs
. - RSView loads JARs from
customlibs
first, and then fromgatewaylibs
.
The loading order is important when you have different versions of the same JAR in both directories. Therefore, it is recommended to follow these best practices when copying custom libraries:
- Always use
gatewaylibs
for code ran on RSRemote and RSControl. - Use
customlibs
when your RSView project requires a specific version of a JAR file that you already have a different version of ingatewaylibs
.
After the custom JAR file is in the target directory, you can access its content in your code right away.